package cn.anicert.zk.service;

import java.util.List;

import cn.anicert.zk.bean.Node;
import cn.anicert.zk.bean.TreeNode;

public interface TreeNodeService {
    
    /**
     * 索引path所有节点，索引到最后一层
     * @param list 容器
     * @param path 路径
     * @return
     */
    public List<TreeNode> getAllTreeNodeByPath(List<TreeNode> list, String path);
    
    //获取path的所有子节点TreeNode,只获取一层
    public List<TreeNode> getChildTreeNodeByPath(String path);
    
    //删除TreeNode
    public boolean deleteTreeNode(TreeNode treeNode);
    
    //新增TreeNode
    public boolean addTreeNode(TreeNode treeNode);
    
    //更新TreeNode节点的值
    public boolean updateTreeNodeData(TreeNode treeNode);
    
    //判断TreeNode节点是否存在
    public boolean isExistsTreeNode(TreeNode treeNode);
    
    //获取TreeNode
    public Node readNode(String path);
}
